<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Game Demo</title>

    <script src="utils.js"></script>
    <script src="physicsjs-full.min.js"></script>
    <script src="phyEng.js"></script>
    <script src="graphicEng.js"></script>
    <script src="game.js"></script>

    <style>
        body, html {
            width: 1280px;
            height: 100%;
            margin: 0;
            padding: 0;
        }

        body {
            padding-top: 100px;
        }

        canvas {
            width: 800px;
            height: 500px;
            border: 1px solid lightgrey;
            margin: auto;
            display: block;
        }
    </style>
</head>
<body>
    <canvas></canvas>
    <div style="margin: 20px">Project address:  https://git.oschina.net/TonyGuo/GameDemo.git</div>
    <div style="position: absolute; top: 0; left: 0; margin: 10px">
        <div>x: <span id="x"></span></div>
        <div>y: <span id="y"></span></div>
        <div>width: <span id="width"></span></div>
        <div>height: <span id="height"></span></div>
        <div>vx: <span id="vx"></span></div>
        <div>vy: <span id="vy"></span></div>
    </div>
</body>

<script>
    window.onload = () => {
        const game = new Game(document.querySelector('canvas'));

        game.start();

        window.game = game;
    }
</script>
</html>